home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #3
/
Amiga Plus CD - 1996 - No. 3.iso
/
pd
/
daten
/
routeplanner_v1.6
/
routeplanner.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-20
|
5KB
|
171 lines
// RoutePlanner.h
#include <exec/types.h>
#include <exec/lists.h>
// Defines for SpeedCode
#define USE_SPEED (0)
#define USE_TIME (1)
#define INTERSTATE_RURAL (2)
#define INTERSTATE_SUBURBAN (3)
#define INTERSTATE_URBAN (4)
#define HIWAY_4LANE (5)
#define HIWAY_2LANE (6)
#define HIWAY_2LANE_SLOW (7)
#define HIWAY_SUBURBAN (8)
#define HIWAY_URBAN (9)
// Northern (55 state) US defines
#define INTERSTATE_NE_RURAL (10)
#define INTERSTATE_NE_URBAN (11)
// Canada defines
#define HIWAY_CANADA_AUTOROUTE (12)
#define HIWAY_CANADA_PRIMARY (13)
// UK defines
#define UK_MOTORWAY_RURAL (14)
#define UK_MOTORWAY_SUBURBAN (15)
#define UK_MOTORWAY_URBAN (15)
#define UK_PRIMARY_4LANE (17)
#define UK_PRIMARY_2LANE (18)
#define UK_OTHER_2LANE (19)
// Defines for Units
#define UNITS_METRIC (0)
#define UNITS_ENGLISH (1)
// Defines for Directions
#define DIRECTION_IGNORE (0) // No direction defined
#define DIRECTION_NORTH (1)
#define DIRECTION_NORTHEAST (2)
#define DIRECTION_EAST (3)
#define DIRECTION_SOUTHEAST (4)
#define DIRECTION_SOUTH (5)
#define DIRECTION_SOUTHWEST (6)
#define DIRECTION_WEST (7)
#define DIRECTION_NORTHWEST (8)
// Data structures
struct OldCoords {
double longitude;
double latitude;
};
struct NewCoords {
float longitude;
float latitude;
};
#define CityData NewCityData
#define RouteData NewRouteData
struct OldCityData {
ULONG CityID; // city identifier
char CityName[40]; // city name
char StateName[24]; // state/province only
struct RouteData *RoadList; /* roads to/from city */
struct CityData *WorkList; /* temp job queue */
struct CityData *NextCity[2]; /* result links */
unsigned short MinDist[2]; /* closest so far */
unsigned char Colum; // goes with RoadList
unsigned char cd_Dummy; // Dummy to l-w align stuff
BOOL Intersection; // If TRUE, ignored
BOOL Displayed; // List this city?
BOOL CoordsExist;
struct OldCoords CityPos;
};
struct OldRouteData {
ULONG RouteID;
struct CityData *CityNum[2]; /* cities each end */
struct RouteData *RLink[2]; /* link for each city */
ULONG CityID[2]; // Stored in the file
UWORD Directions[2]; /* Direction from city[n] */
UWORD Distance;
UWORD Speed; // Speed or time
UWORD SpeedCode;
UWORD Units;
char Hiway[32]; /* name of Highway */
unsigned char Colm[2]; /* goes with RLink */
char Exits[2][6];
};
struct NewCityData {
struct CityData *WorkList; /* temp job queue */
struct CityData *NextCity[2]; /* result links */
struct RouteData *RoadList; /* roads to/from city */
unsigned short MinDist[2]; /* closest so far */
UWORD CityID; // city identifier
char CityName[32]; // city name
char StateName[22]; // state/province only
unsigned char Colum; // goes with RoadList
unsigned char cd_Dummy; // used by RouteEdit
unsigned char cd_Dummy2; //
char Intersection; // If TRUE, ignored
char Displayed; // List this city?
char CoordsExist;
struct NewCoords CityPos;
};
struct NewRouteData {
struct CityData *CityNum[2]; /* cities each end */
struct RouteData *RLink[2]; /* link for each city */
unsigned char Colm[2]; /* goes with RLink */
UWORD RouteID;
UWORD CityID[2]; // Stored in the file
UBYTE Directions[2]; /* Direction from city[n] */
UWORD Distance;
UWORD Speed; // Speed or time
UBYTE SpeedCode;
UBYTE Units;
char Hiway[32]; /* name of Highway */
char Exits[2][6];
};
struct CityNode {
struct Node cn_Node;
struct CityData cn_City;
};
struct RouteNode {
struct Node rn_Node;
struct RouteData rn_Route;
};
struct CityName {
ULONG cn_CityID;
char cn_Name[64];
};
struct RouteName {
ULONG rn_RouteID;
char rn_Name[120];
};
struct TripEntry {
UWORD te_Distance;
UWORD te_Time;
char *te_Route;
char *te_Begin;
char *te_End;
};
#define CT_NOPOINT 0
#define CT_WAYPOINT 1
#define CT_ENDPOINT 2
struct CityTrail {
struct CityData *ct_City;
UWORD ct_Waypoint;
};
struct DataBaseInfo {
char dbi_Author[60];
char dbi_EMail[60];
ULONG dbi_AuthorCode;
ULONG dbi_Security; // DFT of dbi_AuthorCode, cdcount, and rdcount
};